ocaml: remove undefined behaviour in systemd_stubs.c
authorWei Liu <wei.liu2@citrix.com>
Mon, 23 Jul 2018 10:26:49 +0000 (11:26 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 24 Jul 2018 08:16:16 +0000 (09:16 +0100)
commit6e2a53afa15422ee290663dbb798c085ef7068ed
tree76d57d93392fb70d42ba412e8ad1f23de9bcaac8
parent1626164929d54dc57a1f43e24f5560f13f2420fe
ocaml: remove undefined behaviour in systemd_stubs.c

Clang complains:

systemd_stubs.c:51:8: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
        ret = Val_int(-1U);
              ^~~~~~~~~~~~

Since sd_notify_fd has a signature of unit -> unit, we simply change
the return value to Val_unit.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/ocaml/xenstored/systemd_stubs.c